package cn.tedu.boot07.controller;

import cn.tedu.boot07.entity.Person;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AxiosController {
    @RequestMapping("/helloAxios")
    public String helloAxios(String name, Integer age) {
        return "服务器接收到了请求！name=" + name + "age=" + age;
    }

    @RequestMapping("/postAxios")
    public String postAxios(@RequestBody Person person) {

        return "测试成功" + person.toString();
    }
}
